// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Exceptions.cs" company="">
//   
// </copyright>
// <summary>
//   Defines the DbDiffExceptionBase type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace DbDiff.Common.Helper
{
    using System;

    /// <summary>
    /// The db diff exception base.
    /// </summary>
    [Serializable]
    public class DbDiffExceptionBase : ApplicationException
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DbDiffExceptionBase"/> class. 
        /// Konstruktor
        /// </summary>
        public DbDiffExceptionBase ()
            :base()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DbDiffExceptionBase"/> class. 
        /// Konstruktor
        /// </summary>
        /// <param name="Message">
        /// Kivtel szvege
        /// </param>
        public DbDiffExceptionBase (string Message)
            :base(Message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DbDiffExceptionBase"/> class. 
        /// Konstruktor
        /// </summary>
        /// <param name="Message">
        /// Kivtel szvege
        /// </param>
        /// <param name="InnerException">
        /// Bels exception-k
        /// </param>
        public DbDiffExceptionBase (string Message, Exception InnerException)
            :base(Message, InnerException)
        {
        }
    }


    /// <summary>
    /// The db diff exception.
    /// </summary>
    [Serializable]
    public class DbDiffException : DbDiffExceptionBase
    {
        #region Fields & properties

        /// <summary>
        /// The _caller.
        /// </summary>
        private readonly string _caller;

        /// <summary>
        /// Gets Caller.
        /// </summary>
        public string Caller 
        {
            get {return this._caller;}
        }
        #endregion Fields & properties
    

        /// <summary>
        /// Initializes a new instance of the <see cref="DbDiffException"/> class. 
        /// Konstruktor
        /// </summary>
        public DbDiffException ()
            :base()
        {
            this._caller = string.Empty;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DbDiffException"/> class. 
        /// Konstruktor
        /// </summary>
        /// <param name="Message">
        /// Kivtel szvege
        /// </param>
        public DbDiffException (string Message)
            :base(Message)
        {
            this._caller = string.Empty;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DbDiffException"/> class. 
        /// Konstruktor
        /// </summary>
        /// <param name="Message">
        /// Kivtel szvege
        /// </param>
        /// <param name="caller">
        /// The caller.
        /// </param>
        public DbDiffException (string Message, string caller)
            :base(Message)
        {
            this._caller = caller;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DbDiffException"/> class. 
        /// Konstruktor
        /// </summary>
        /// <param name="Message">
        /// Kivtel szvege
        /// </param>
        /// <param name="InnerException">
        /// Bels exception-k
        /// </param>
        public DbDiffException (string Message, Exception InnerException)
            :base(Message, InnerException)
        {
            this._caller = string.Empty;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DbDiffException"/> class. 
        /// Konstruktor
        /// </summary>
        /// <param name="Message">
        /// Kivtel szvege
        /// </param>
        /// <param name="caller">
        /// The caller.
        /// </param>
        /// <param name="InnerException">
        /// Bels exception-k
        /// </param>
        public DbDiffException (string Message, string caller, Exception InnerException)
            :base(Message, InnerException)
        {
            this._caller = caller;
        }
    }
}
